import request from '@/utils/request'

// 查询客户管理列表
export function listCustomInfo(query) {
  return request({
    url: '/waitress/customInfo/list',
    method: 'get',
    params: query
  })
}

// 查询客户管理详细
export function getCustomInfo(customId) {
  return request({
    url: '/waitress/customInfo/' + customId,
    method: 'get'
  })
}

// 新增客户管理
export function addCustomInfo(data) {
  return request({
    url: '/waitress/customInfo',
    method: 'post',
    data: data
  })
}

// 修改客户管理
export function updateCustomInfo(data) {
  return request({
    url: '/waitress/customInfo',
    method: 'put',
    data: data
  })
}

// 删除客户管理
export function delCustomInfo(customId) {
  return request({
    url: '/waitress/customInfo/' + customId,
    method: 'delete'
  })
}

// 导出客户管理
export function exportCustomInfo(query) {
  return request({
    url: '/waitress/customInfo/export',
    method: 'get',
    params: query
  })
}

//业主成员列表
export function roomCustomList(query) {
  return request({
    url: '/waitress/customInfo/roomCustomList',
    method: 'get',
    params: query
  })
}

// 新增业主成员
export function addFamily(data) {
  return request({
    url: '/waitress/customInfo/addFamily',
    method: 'post',
    data: data
  })
}

//下载客户信息模板
export function importTemplate() {
  return request({
    url: '/waitress/customInfo/importTemplate',
    method: 'get'
  })
}
